import request from './request'

export function query ({currentPage = 1, perPage = 10,mchtId, orderNo,contact,phone, isLogistics,startDate,endDate,orderTimeType} = {}) {
  return request({
    url: '/console/order/queryAllInfo.do',
    method: 'POST',
    body: {currentPage, perPage,mchtId, orderNo,contact,phone, isLogistics,startDate,endDate,orderTimeType}
  })
}

export function queryDetail (id) {
  return request({
    url: '/console/order/queryDetail.do',
    method: 'POST',
    body: {id}
  })
}

export function create ({orderNo, logisticsName, logisticsCode}) {
  return request({
    url: '/console/order/addLogisticsInfo.do',
    method: 'POST',
    body: {orderNo, logisticsName, logisticsCode}
  })
}

export function edit ({orderNo, id, logisticsName, logisticsCode}) {
  return request({
    url: '/console/order/updateLogisticsInfo.do',
    method: 'POST',
    body: {orderNo, id, logisticsName, logisticsCode}
  })
}